﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Universum.Infrastructure.Utils;
using StructureMap;

namespace Universum.Infrastructure.Configuration
{
	public static class ConstantIdentifiers
	{
		// configuration of roles used to limit access to certain areas
		

		static readonly IPathConfigurationService PathConfigurationService=ObjectFactory.GetInstance<IPathConfigurationService>();

		public const string ROLE_OF_TEACHER = "Teacher";
		public const string ROLE_OF_STUDENT = "Student";
		public const string ROLE_OF_SUPER = "Secretary";
		public const string ROLE_OF_TEACHER_OR_STUDENT =
			"Teacher, Student";
		internal const string SPECIAL_USER = "secretary";// could very well be admin
		// defines the location for the database file
		internal static readonly string USER_PICTURE_PATH = PathConfigurationService.UserPicturePath; // @"D:\_2009_\Licenta\UserPictures";
		internal static readonly string DB4O_FILE_NAME = PathConfigurationService.DatabaseFilePath;//@"D:\_2009_\Licenta\Development.database";
		// defines the location for indexing articles
		internal static readonly string LUCENE_INDEXING_FOLDER_BLOG = PathConfigurationService.BlogIndexingFolderPath;//@"D:\_2009_\Licenta\BlogIndexes";
		internal static readonly string LUCENE_INDEXING_FOLDER_QUESTION = PathConfigurationService.QuestionIndexingFolderPath; //@"D:\_2009_\Licenta\QuestionIndexes";		
		internal static readonly string LUCENE_INDEXING_FOLDER_TEACHER_ARTICLE = PathConfigurationService.TeacherArticleIndexingFolderpath;//@"D:\_2009_\Licenta\TeacherIndexes";
		
		// used to direct resources
		public static readonly string RESOURCES_PATH = PathConfigurationService.ResourcesPath;// @"D:\Temp";
		// used to recover the username from the path
		public static string ROUTE_USERNAME_KEY = "username";
		/// <summary>
		///  representation for a folder resources
		/// </summary>

		public static string folder_icon = "images\\folder_ikon.png";
		/// <summary>
		/// representation for a zip resource
		/// </summary>
 
		public static string zip_icon = "images\\zip_ikon.png";
		/// <summary>
		/// representation for a image resource
		/// </summary>
		public static string image_icon = "images\\image_ikon.png";
		/// <summary>
		/// representation for a pdf resource
		/// </summary>
		public static string pdf_icon = "images\\pdf_ikon.png";
		/// <summary>
		/// representation for a word resource
		/// </summary>
		public static string word_icon = "images\\word_ikon.png";

		public static string logon_image = "images\\logon.png";
		
		public const string FILETYPE_APPLICATION_PDF = "application/pdf";
		public const string FILETYPE_APPLICATION_MSWORD = "application/msword";
		
		public const string FILETYPE_IMAGE_JPEG = "image/jpeg";
		public const string FILETYPE_IMAGE_JPG = "image/jpg";
		public const string FILETYPE_IMAGE_GIF = "image/gif";
		public const string FILETYPE_IMAGE_PNG = "image/png";
		public const string FILETYPE_APPLICATION_ZIP = "application/zip";
		public const string FILETYPE_APPLICATION_RAR = "application/rar";
		public const string FILETYPE_APPLICATION_7ZIP = "application/7zip";
		public const string FILETYPE_APPLICATION_MSWORD_DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
		public const string FILETYPE_APPLICATION_RTF = "application/rtf";
		public const string FILETYPE_TEXT_PLAIN = "text/plain";

		/// <summary>
		/// Maps accepted map types
		/// </summary>
		public static string[] accepted_file_types = 
		{
													
			FILETYPE_APPLICATION_MSWORD,
			FILETYPE_APPLICATION_MSWORD_DOCX,
			FILETYPE_APPLICATION_PDF,
			FILETYPE_APPLICATION_ZIP,
			FILETYPE_APPLICATION_7ZIP,
			FILETYPE_APPLICATION_RAR,
			FILETYPE_IMAGE_GIF,
			FILETYPE_IMAGE_JPEG,
			FILETYPE_IMAGE_JPG,	
			FILETYPE_IMAGE_PNG,
			FILETYPE_TEXT_PLAIN,
			FILETYPE_APPLICATION_RTF
	    };
		// defines results per page
		public const int RESULTS_PER_PAGE = 10;
		// specifies a search in blogs
		public const string SEARCH_IN_BLOGS = "Blogs";
		// specefies a search in questions
		public const string SEARCH_IN_QUESTIONS = "Questions";
		// specifies a search in page articles
		public const string SEARCH_IN_TEACHER_ARTICLES = "Teacher article";
		// used for the name where to search
		public const string SEARCH_IN_PLACE = "place";
		
		// used as a notice message		 
		public const string NOTICE = "Notice";
	}
}
